<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CodeSphere</title>


<link rel="stylesheet" type="text/css" href="styles/pagination.css">
<link rel="stylesheet" type="text/css" href="styles/csmain.css">
<link rel="stylesheet" type="text/css" href="styles/jquery.snippet.css">

<link href='http://fonts.googleapis.com/css?family=Philosopher'
	rel='stylesheet' type='text/css'>

<script src="scripts/jquery-1.4.4.js" type="text/javascript"></script>
<script src="scripts/jquery.pagination.js" type="text/javascript"></script>
<script src="scripts/jquery.idTabs.min.js" type="text/javascript"></script>
<script src="scripts/jquery.tmpl.js" type="text/javascript"></script>
<script src="scripts/jquery.url.js" type="text/javascript"></script>
<script src="scripts/jquery.snippet.js" type="text/javascript"></script>
<script src="scripts/cscommon.js" type="text/javascript"></script>

<script type="text/javascript">
	$(window).load(
			function() {

				$('#searchform').submit(function(data) {
					handleSearch($.url.param("repo"));
					return false;
				});

				// get total record count
				$.get('/codesphereweb/resources/svnlog/count?repo='
						+ $.url.param("repo"), function(data) {
					var count = data.split('/');

					$("#pagination").pagination(count[0], {
						items_per_page : count[1],
						num_edge_entries : 1,
						callback : handlePaginationClick
					}); // pagination
				}); // get

			});
</script>
</head>

<body>
<div id="wrapper"><script id="diffformtemplate" type="text/html">
<div id="divdiffform">
	<form id="diffform" action="#">
		<input type="hidden" id="path" value="${path}" />
		r <select id="old">
		{{each(i, val) revisions}}
		<option value=${val.revision}>${val.revision}</option>
		{{/each}}
		</select> vs 
		r <select id="new">
		{{each(i, val) revisions}}
		<option value=${val.revision}>${val.revision}</option>
		{{/each}}
		</select>
		<input type="submit" name="submit" value="Submit"/>
	</form>
</div>
</script> 
<script id="searchResultsTemplate" type="text/html">
		<p id="queryText">You searched for ${searchText}</p>
		{{each(i, item) searchResults}}
			<div id="logentry"><p id="author" class="author">${item.author}
				<span class="date"> (Revision: ${item.revision} ) at ${item.date} </span></p>
				<p id="message" class="message">${item.message}</p>
				<ul>
				{{each(i, c) item.revisionChanges}}
					<li>${c.changeType} - <a id="changesetfile" href="#${c.filename}">${item.revision}:
					${c.path}</a> - <a id="difflink" href="#${c.path}">(diff)</a></li>
				{{/each}}
				</li>
			</div>
		{{/each}}		
</script>
<div id="header">
<h1 align="right"><a href="/codesphereweb">Codesphere</a></h1>
</div>
<div id="main">
<div class="searchbox">
<form id="searchform" action="#"><input type="text"
	class="search-field" id="searchtext" /><input class="search-submit"
	value="Submit" type="submit" /></form>
</div>
<div id="divIdTabs" class="usual">
<ul class="idTabs">
	<li><a id="activityStreamLink" href="#svnlog">Activity Stream</a></li>
	<li><a id="searchViewLink" href="#searchview">Search View</a></li>
	<li><a id="sourceViewLink" href="#sourceview">Source View</a></li>
	<li><a id="diffViewLink" href="#diffview">Diff View</a></li>
</ul>
<div id="svnlog">
<div id="entries"></div>
<div id="pagination"></div>
</div>
<div id="searchview">
<div id="results"></div>
</div>
<div id="sourceview">
<div id="filename"></div>
<pre class="sourcecode"></pre></div>
<div id="diffview"><script id="difftemplate" type="text/html">
<table class="codefont" style="border-collapse: collapse;" cellpadding="0"
	cellspacing="0">
	<tbody id="lines">
		<tr class="header">
			<td></td>
			<td width="50%">${oldRevision}</td>
			<td></td>
			<td width="50%">${revision}</td>
		</tr>
		{{each(i, val) diffRows }}
		{{html getTr(i, val.tag, val.oldLine, val.newLine)}}
		{{/each}}
	</tbody>
</table>
</script></div>
</div>

</div>
<div id="footer"></div>
</div>
</body>
</html>